package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 维修过程表
 */
@Entity
@Table(name = "wei_course", schema = "lxh_crm", catalog = "")
public class WeiCourse {
    private int weiCourseId;
    private Integer workordId;
    private String weiRemark;
    private Date planFinDate;
    private Integer empId;
    private Date beginDate;
    private Date finishDate;
    private Integer weiState;

    @Id
    @Column(name = "wei_course_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getWeiCourseId() {
        return weiCourseId;
    }

    public void setWeiCourseId(int weiCourseId) {
        this.weiCourseId = weiCourseId;
    }

    @Basic
    @Column(name = "workord_id", nullable = true)
    public Integer getWorkordId() {
        return workordId;
    }

    public void setWorkordId(Integer workordId) {
        this.workordId = workordId;
    }

    @Basic
    @Column(name = "wei_remark", nullable = true, length = 200)
    public String getWeiRemark() {
        return weiRemark;
    }

    public void setWeiRemark(String weiRemark) {
        this.weiRemark = weiRemark;
    }

    @Basic
    @Column(name = "plan_fin_date", nullable = true)
    public Date getPlanFinDate() {
        return planFinDate;
    }

    public void setPlanFinDate(Date planFinDate) {
        this.planFinDate = planFinDate;
    }

    @Basic
    @Column(name = "emp_id", nullable = true)
    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "begin_date", nullable = true)
    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    @Basic
    @Column(name = "finish_date", nullable = true)
    public Date getFinishDate() {
        return finishDate;
    }

    public void setFinishDate(Date finishDate) {
        this.finishDate = finishDate;
    }

    @Basic
    @Column(name = "wei_state", nullable = true)
    public Integer getWeiState() {
        return weiState;
    }

    public void setWeiState(Integer weiState) {
        this.weiState = weiState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WeiCourse weiCourse = (WeiCourse) o;
        return weiCourseId == weiCourse.weiCourseId &&
                Objects.equals(workordId, weiCourse.workordId) &&
                Objects.equals(weiRemark, weiCourse.weiRemark) &&
                Objects.equals(planFinDate, weiCourse.planFinDate) &&
                Objects.equals(empId, weiCourse.empId) &&
                Objects.equals(beginDate, weiCourse.beginDate) &&
                Objects.equals(finishDate, weiCourse.finishDate) &&
                Objects.equals(weiState, weiCourse.weiState);
    }

    @Override
    public int hashCode() {
        return Objects.hash(weiCourseId, workordId, weiRemark, planFinDate, empId, beginDate, finishDate, weiState);
    }
}
